<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<div class="layout">
    <table class="layout">
        <tr>
            <th class="layout">Node:</th>
            <td><beans:write name="nodeValue" property="name"/></td>
        </tr>
        <tr>
            <th class="layout">Group Accesses:</th>
            <td class="layout">
                <table class="styled" cellspacing="0">
                    <tr>
                        <th class="styled">Node</th>
                        <th class="styled">Group</th>
                        <th class="styled">Role</th>
                        <th class="styled">Delete?</th>
                    </tr>
                    <logic:iterate name="groupAccessByNode" id="access">
                        <tr>
                            <td class="styled"><beans:write name="access" property="nodeName"/></td>
                            <td class="styled"><beans:write name="access" property="accessorName"/></td>
                            <td class="styled"><beans:write name="access" property="roleName"/></td>
                            <html:form action="groupaccess.do?method=deleteCheck" method="post">
                                <html:hidden name="access" property="accessId"/>
                                <td class="styled" style="text-align: center;">
                                    <logic:equal name="access" property="isDeletable" value="true">
                                        <html:submit property="btnDelete" value="Delete"/>
                                    </logic:equal>
                                    <logic:notEqual name="access" property="isDeletable" value="true">
                                        No permission
                                    </logic:notEqual>
                                </td>
                            </html:form>
                        </tr>
                    </logic:iterate>
                </table>
            </td>
        </tr>
    </table>
</div>